<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
            <meta charset="utf-8">
            <title><?php echo ($seo_title); ?></title>
            <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
            <meta name="apple-mobile-web-app-capable" content="yes">
            <meta name="apple-mobile-web-app-status-bar-style" content="black">
            <meta name="format-detection" content="telephone=no" />
            <meta name="format-detection" content="email=no" />
            <meta name="keywords" content="<?php echo ($seo_keywords); ?>" />
            <meta name="description" content="<?php echo ($seo_description); ?>">
            <meta name="screen-orientation" content="portrait">
            <meta name="x5-orientation" content="portrait">
            <link rel="shortcut icon" href=" /favicon.ico" />
            <link rel="apple-touch-icon" href="/icon.png" />
            <link rel="apple-touch-start-image" href="/start.png" />

            <link rel="stylesheet" type="text/css" href="/Static/mobile/css/style.css">
            <link rel="stylesheet" type="text/css" href="/Static/mobile/css/SpsBtn.css">
            <script src="/Static/mobile/js/jquery.js"></script>
            <script src="/Static/mobile/js/layer.mobile-v1.6/layer.m.js"></script>
            <script src="/Static/mobile/js/common.js"></script>
            <script src="/Static/mobile/js/jquery.lazyload.min.js"></script>
            <link rel="stylesheet" type="text/css" href="/Static/mobile/iconfont/iconfont.css">
            <!-- 微信分享 -->
            <!-- 如果是微信客户端 -->
<input id="networkType" value="" type="hidden">
<?php if($is_wechat){ ?>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
<script type="text/javascript">
		wx.config({
		
		<?php if($hlopenid =="oaGjOtyJCTObWB2BZbkLfxyVHTMA"){?>
		 debug:true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，
		
		<?php } ?>
		
		  //若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
		  appId:'<?php echo ($jssign['appid']); ?>', // 必填，公众号的唯一标识
		  timestamp:'<?php echo ($jssign['timestamp']); ?>', // 必填，生成签名的时间戳
		  nonceStr:'<?php echo ($jssign['noncestr']); ?>', // 必填，生成签名的随机串
		  signature:'<?php echo ($jssign['signature']); ?>',// 必填，签名，见附录1
	      jsApiList: [
	                  'checkJsApi',
	                  'onMenuShareTimeline',
	                  'onMenuShareAppMessage',
	                  'onMenuShareQQ',
	                  'onMenuShareWeibo',
	                  'onMenuShareQZone',
	                  'hideMenuItems',
	                  'showMenuItems',
	                  'hideAllNonBaseMenuItem',
	                  'showAllNonBaseMenuItem',
	                  'translateVoice',
	                  'startRecord',
	                  'stopRecord',
	                  'onVoiceRecordEnd',
	                  'playVoice',
	                  'onVoicePlayEnd',
	                  'pauseVoice',
	                  'stopVoice',
	                  'uploadVoice',
	                  'downloadVoice',
	                  'chooseImage',
	                  'previewImage',
	                  'uploadImage',
	                  'downloadImage',
	                  'getNetworkType',
	                  'openLocation',
	                  'getLocation',
	                  'hideOptionMenu',
	                  'showOptionMenu',
	                  'closeWindow',
	                  'scanQRCode',
	                  'chooseWXPay',
	                  'openProductSpecificView',
	                  'addCard',
	                  'chooseCard',
	                  'openCard'
	                ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
		});
		
		wx.ready(function(){
			//分享到朋友圈
		  wx.onMenuShareTimeline({
		    title:'<?php echo $share_title ? $share_title : C("SHARE_DEFAULT_TITLE");?>', // 分享标题
		    link:'<?php echo $share_url ? $share_url : C("SHARE_DEFAULT_URL");?>', // 分享链接
		    imgUrl:'<?php echo $share_img ? $share_img : C("SHARE_DEFAULT_IMG");?>', // 分享图标
		    success: function(){
		    	
		    },
		    cancel: function(){
		    }
		  });
		  //分享给好友
		  wx.onMenuShareAppMessage({
		    title:'<?php echo $share_title ? $share_title : C("SHARE_DEFAULT_TITLE");?>', // 分享标题
		    desc:'<?php echo $share_description ? $share_description : C("SHARE_DEFAULT_DESC");?>', // 分享描述
		    link:'<?php echo $share_url ? $share_url : C("SHARE_DEFAULT_URL");?>', // 分享链接
		    imgUrl:'<?php echo $share_img ? $share_img : C("SHARE_DEFAULT_IMG");?>', // 分享图标
		    type: '',
		    dataUrl: '',
		    success: function () { 
		    },
		    cancel: function () { 
		
		    }
		  });  
		  
		  wx.getNetworkType({
			    success: function (res) {
			        var networkType = res.networkType; // 返回网络类型2g，3g，4g，wifi
			        $("#networkType").val(networkType);
			    }
			});
		  
		  //复制链接menuItem:copyUrl
		  wx.hideMenuItems({
			 menuList: ["menuItem:originPage",
			            "menuItem:share:facebook",
			            "menuItem:share:qq",
			            "menuItem:share:weiboApp",
			            "menuItem:share:QZone",
			            "menuItem:readMode",
			         //   "menuItem:openWithQQBrowser",
			         //   "menuItem:openWithSafari",
			            "menuItem:share:email",
			            "menuItem:share:brand",
			            "menuItem:copyUrl",//复制链接
			            <?php if($controller == 'qrcode'){ ?>
			            "menuItem:share:timeline",//朋友圈
			            "menuItem:share:appMessage",//朋友
			            <?php } ?>
			            ], // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
		      success: function (res) {
		         // alert('已隐藏“阅读模式”，“分享到朋友圈”，“复制链接”等按钮');
		        },
		        fail: function (res) {
		          //alert(JSON.stringify(res));
		        }
		  });
		  
		  //wx.hideOptionMenu();//批量隐藏保护类 传播类按钮
		 
		});

		//浏览图片
		function previewImage(now_pic,pics){
			wx.previewImage({
			   current: now_pic, // 当前显示图片的http链接
			   urls: pics // 需要预览的图片http链接列表
			});
		}
		
		//浏览图片
		$('.previewImageList').on('click', function(){
			var now_pic = $(this).attr("src");
			var pics = new Array();
			
			$('.previewImage').each(function(index) {
				pics[index] = $(this).attr("src");
			 });
			
			previewImage(now_pic,pics);
			
		});

		</script>

<?php } ?>
		
<?php if(!$is_mobile){ ?>
        <style>
html,body{
    height:100%;
    width:50%;
    margin:0 auto;
}
.nav{
    position:fixed;
    width:25%;

}
.morder_nav{
	position:absolute;
}
</style>
<?php } ?>
	</head>
<body>
	<style>
.detail-searchbox {
	padding: 5px 3.124%;
	background: #f3f3f3;
}
.detail-searchbox .members_search {
	margin-bottom: 8px;
	background: #fff;
}
</style>

<div class="membersbox pad50">

	<div class="detail-searchbox">
		<section class="members_search">
			<form method="get" action="">
				<input type="text" name="goods_name" id="goods_name" value="<?php echo get('goods_name');?>" placeholder="商品搜索：请输入商品关键字">
				<button type="submit"></button>
			</form>
		</section>
	</div>

	<section class="mlist_nav g-box">
		<?php $orderby = get('orderby');?>
		<span class="<?php echo (($orderby=='') ? 'cur' : ''); ?>"><a href="/mobile/goods/lists/?orderby=">默认</a></span>
		<span class="<?php echo (($orderby=='pricedown') ? 'cur' : ''); ?>"><a href="/mobile/goods/lists/?orderby=pricedown">价格</a></span>
		<span class="<?php echo (($orderby=='sales') ? 'cur' : ''); ?>"><a href="/mobile/goods/lists/?orderby=sales">销量</a></span>
		<span class="<?php echo (($orderby=='pv') ? 'cur' : ''); ?>"><a href="/mobile/goods/lists/?orderby=pv">人气</a></span>

	</section>

<?php foreach($datalist as $kk=>$vv){?>

<section class="mlist_nav" style="margin-top:10px;background-color:#01aaef;">
	<span>
	<a class="fl" style="color:#fff;margin-left:10px;font-size:16px;border-bottom: 0;font-weight:bold;" href="/mobile/goods/lists/?orderby=<?php echo get('orderby');?>&gtype_id=<?php echo $kk;?>">| <?php echo $gtype[$kk]['gtype_name']; ?></a>
	<a class="fr" style="color:#fff;margin-right:15px;border-bottom: 0;" href="/mobile/goods/lists/?orderby=<?php echo get('orderby');?>&gtype_id=<?php echo $kk;?>">更多></a>
	</span>
</section>
<!--  
<section id="J-listgoods" class="mlist_goods newlist avr">
		<ul class="clearfix">
		
			<?php foreach($vv as $k=>$v){?>
			<li class="g-box por">
				<section>
					<a href="/mobile/goods/index/?goods_id=<?php echo $v['goods_id'];?>">
					<img src="<?php echo C("UPYUN_DOMAIN").$v['goods_pic'];?>!/fw/640"  onerror="javascript:this.src='/Static/mobile/images/goods.jpg';">
					</a>
					<span>热卖</span>
				</section>
				<section class="g-flex">
					<div class="goods-detail">
						<a href="/mobile/goods/index/?goods_id=<?php echo $v['goods_id'];?>"><?php echo $v['goods_name'];?></a>
						<p class="listsgoods-group"></p>
					</div>
					<p>
						<b> <em>¥</em> <?php echo $v['shop_price'];?>
						</b> <span class="original_price"><s>¥<?php echo $v['market_price'];?></s></span>
					</p>
				</section> 
			</li>
		<?php } ?>
			
		</ul>
	</section>
	-->

	<section class="members_goodspic">
		<ul>
		
		<?php foreach($vv as $k=>$v){?>
		
			<?php if( ($v['goods_id'] == 16 && ($memberinfo['grade_id'] >= 3)) || ($v['goods_id'] != 16) ){ ?>
		
			<li class="biggoods">
			<a class="goodsimg" href="/mobile/goods/index/?goods_id=<?php echo $v['goods_id'];?>">
			<img data-original="<?php echo C("UPYUN_DOMAIN").$v['goods_pic'];?>!/fw/640" class="lazyload" width="100%"  onerror="javascript:this.src='/Static/mobile/images/goods.jpg';">
			</a>
				<section class="members_goodsimg_name rename clearfix" >
					<a href="/mobile/goods/index/?goods_id=<?php echo $v['goods_id'];?>"><?php echo $v['goods_name'];?></a>
					 <span> 
                                             
                                             <?php if($v['gtype_id']==9) { ?>
                                
                                            <span><?php echo $v['shop_price'];?>积分</span>
                                               <?php }else{ ?>
                                               <span class="yen">&yen;</span><?php echo $v['shop_price'];?>
                                               <?php } ?>

					 
					 <span class="original_price">原价：<s>&yen;<?php echo $v['market_price'];?></s></span>
					</span>
				</section>
			</li>
					
			<?php } ?>
		<?php } ?>		
			
		</ul>
	</section>
	

	
	
<?php } ?>	


	


			<section class="members_bottom">
			<section style="height: 48px;">
				&copy; <?php echo date('Y');?> <?php echo C("SITE_NAME");?> 版权所有
				<p><?php echo C("POWER_BY");?></p>
			</section>
		</section>

<?php if(!$nocart){?>
<!--  
<a href="/mobile/cart/mycart" class="navCart" id="navCart"><span><?php echo $cartNum;?></span></a>
-->
<?php } ?>
</div>

<style>
    .nav section .nav-item.wid4{
        width:25%;
    }
    .nav-item h2 {
        line-height: 20px;
        top: -5px;
        position: relative;
    }
    body{
        line-height: inherit;
    }
</style>
<div class="nav">
    <section class="inner">
        <section class="nav-lists clearfix hasmenu9">
            <dl class="nav-item j-showNavSub wid4 style1 fl">
                <dt>
                    <a href="/mobile/" style="background-color: #fff; color: #333">
                        <i style="font-size: 20px;<?php echo $controller=='index'?'color:#3BA7D5;':'';?>" class="icon iconfont icon-home<?php echo $controller=='index'?'fill':'';?>"><h2>首页</h2></i>
                    </a>
                </dt>
            </dl>
            <dl class="nav-item j-showNavSub wid4 style1 fl">
                <dt>
                    <a href="/mobile/cart/daili" style="background-color: #fff; color: #333">
                        <i style="font-size: 20px;<?php echo $action=='baodan'?'color:#3BA7D5;':'';?>" class="icon iconfont icon-list<?php echo $action=='daili'?'':'';?>"><h2>申请代理</h2></i>
                    </a>
                </dt>
            </dl>
            
             <dl class="nav-item j-showNavSub wid4 style1 fl">
                <dt>
                    <a href="/mobile/cart/mycart" style="background-color: #fff; color: #333">
                        <i style="font-size: 20px;<?php echo $controller=='cart'&&$action=='mycart'?'color:#3BA7D5;':'';?>" class="icon iconfont icon-cart<?php echo $controller=='cart'&&$action=='mycart'?'_fill':'';?>_light"><h2>购物车</h2></i>
                    </a>
                </dt>
            </dl>
            <!--
           <dl class="nav-item j-showNavSub wid4 style1 fl">
                <dt>
                    <a href="/mobile/cart/buhuo" style="background-color: #fff; color: #333">
                        <i style="font-size: 20px;<?php echo $action=='buhuo'?'color:#3BA7D5;':'';?>" class="icon iconfont icon-list<?php echo $action=='buhuo'?'':'';?>"><h2>补货</h2></i>
                    </a>
                </dt>
            </dl>
            
            <dl class="nav-item j-showNavSub wid4 style1 fl">
                <dt>
                    <a href="/mobile/cart/transfer" style="background-color: #fff; color: #333">
                        <i style="font-size: 20px;<?php echo $action=='transfer'?'color:#3BA7D5;':'';?>" class="icon iconfont icon-list<?php echo $action=='transfer'?'':'';?>"><h2>拨货</h2></i>
                    </a>
                </dt>
            </dl> -->
            <dl class="nav-item j-showNavSub wid4 style1 fl">
                <dt>
                    <a href="/mobile/user" style="background-color: #fff; color: #333">
                        <i style="font-size: 20px;<?php echo $controller=='user'?'color:#3BA7D5;':'';?>" class="icon iconfont icon-people<?php echo $controller=='user'?'fill':'';?>"><h2>我的</h2></i>

                    </a>
                </dt>
            </dl>
        </section>
    </section>
</div>
	<div id="mmexport">
		<img src="/Static/mobile/images/mmexport.png" width="100%" alt="">
	</div>
	<div id="mmexport-pl" style="display: none;">
		<img src="/Static/mobile/images/mmexport1.png" width="100%" alt="">
	</div>
	<div id="mmexport-share" style="display: none;">
		<img src="/Static/mobile/images/mmexport2.png" width="100%" alt="">
	</div>
	
	
	<!-- 悬浮按钮 -->
	<div class="mask_menu" id="menubtn" style="display: none;"></div>
	<div class="menu" id="menufloat" <?php if(isset($goods['is_xuanfu']) && ($goods['is_xuanfu'] == 0)){ ?>style="display:none;"<?php } ?>>
		<i class="icon-menu"></i>
	</div>
	
	
	<div class="menu-c notel nofocus" id="menufloat-c" <?php if(isset($goods['is_xuanfu']) && ($goods['is_xuanfu'] == 0)){ ?>style="display:none;"<?php } ?>>
		<div class="menu-c-out">
			<div class="menu-c-inner">
				<a class="a-home" href="/mobile" title="首页" style="display: block;"></a> 
				<a class="a-tel" href="tel://<?php echo C('SITE_TEL');?>" title="联系店主" style="display: inline;"></a>
				<a class="a-member" href="/mobile/cart/mycart" title="购物车" style="display: block;"></a> 
				<a class="a-search" href="/mobile/user/index" title="会员" style="display: block;"></a> 
				<a class="a-cart" href="javascript:;" id="share-link" title="分享" style="display: block;"></a>
				<a class="a-collect" href="javascript:void(0)" id="collect-link" title="收藏" style="display: block;"></a> 
				<a class="a-server" href="/mobile/goods/lists" title="搜索" style="display: block;"></a>
			</div>
		</div>
	</div>

	<!-- 收藏 -->
	<div class="collectbg">
		<img src="/Static/mobile/images/collectbg.png" width="100%" alt=""><a href="javascript:;" class="a-know">我知道了</a>
	</div>
	
	<!-- 分享 -->
	<div class="sharebg">
		<img src="/Static/mobile/images/mmexport.png" width="100%" alt=""><a href="javascript:;" class="a-know">我知道了</a>
	</div>
	
	<sectoin class="loading" id="j-loading"></sectoin>
<script type="text/javascript" src="/Static/mobile/js/swipe.js"></script>

<script>
    var IsShop="";//是否是首页

    $(function(){

                
        $(document).on('touchend',"#mmexport",function(){
            $(this).hide();
        });
        $(document).on('touchend',"#mmexport-pl",function(){
            $(this).hide();
        });
        $(document).on('touchend',"#mmexport-share",function(){
            $(this).hide();
        });



                        (function(){
            // 控制添加商品的图片显示高度，确保商品布局正常
            $('.b_mingoods,.mingoods').each(function(index, el) {
                var me = $(this),
                    imgHeight = me.find('img').width();
                me.find('img').closest('a').height(imgHeight);
            });
            $('.board3').each(function(index, el) {
                var me = $(this);
                var bwidth = me.width();
                if(me.hasClass('small_board') || !me.hasClass('big_board')){
                    me.children('span').attr('style', 'height:'+bwidth+'px !important;overflow:hidden;');
                }
                if(me.hasClass('big_board')){
                    me.children('span').attr('style', 'height:'+(bwidth*2+10)+'px !important;overflow:hidden;');
                }
            });

            // 悬浮按钮
            var SpsBtn = {
                config:{
                    menu:document.getElementById('menufloat'),
                    menusub:document.getElementById('menufloat-c'),
                    menubtn:document.getElementById('menubtn')
                },
                init:function(){
                    this.SpsbtnClick();
                    this.touchMove();
                },
                touchMove:function(){
                    var _this = this;
                    _this.config.menu.addEventListener('touchmove',function(e){
                        e.preventDefault();
                        var touch = e.touches[0],
                            moveX,moveY,
                            winWh = window.innerWidth - 50,
                            winHt = window.innerHeight - 50;
                        moveX = touch.clientX -25;
                        moveY = touch.clientY -25;
                        moveY  = moveY  < 0 ? 0 : moveY ;
                        moveX = moveX < 0 ? 0 : moveX;
                        moveY = moveY > winHt ? winHt : moveY;
                        moveX = moveX > winWh ? winWh :moveX;
                         _this.config.menu.style.left = moveX + 'px';
                         _this.config.menu.style.top = moveY + 'px';
                         _this.config.menusub.style.left = moveX + 10 + 'px';
                         _this.config.menusub.style.top = moveY -190 + 'px';
                    },false)
                    
                    
                },
                SpsbtnClick:function(){
                    var _this = this;
                    this.config.menu.addEventListener('click',function(){
                        var me = $(this);
                        // console.log(me)
                        if(!me.hasClass('show')){
                            me.addClass('show');
                            me.siblings('.mask_menu,#menufloat-c').show();
                            me.siblings('#menufloat-c').find('.menu-c-inner').addClass('in').removeClass('outer')
                        }else{
                            me.removeClass('show');
                            me.siblings('.mask_menu,#menufloat-c').hide();
                            me.siblings('#menufloat-c').find('.menu-c-inner').removeClass('in').addClass('outer')
                        }
                    },false);
                    this.config.menubtn.addEventListener('click',function(){
                        $(_this.config.menu).removeClass('show');
                        $(_this.config.menu).siblings('.mask_menu,#menufloat-c').hide();
                        $(_this.config.menu).siblings('#menufloat-c').find('.menu-c-inner').removeClass('in').addClass('outer')
                    })
                }
            }
            SpsBtn.init();            // 收藏按钮
            $('#collect-link').click(function(event) {
                $('.menu').removeClass('show');
                $('.mask_menu').hide();
                $('.menu-c-inner').removeClass('in').addClass('outer')
                $('.collectbg').show();
            });
            $('.a-know').click(function(event) {
                $(this).parent('.collectbg,.sharebg').hide();
            });
            // 分享
            $('#share-link').click(function(event) {
                return false;
                $('.menu').removeClass('show');
                $('.mask_menu').hide();
                $('.menu-c-inner').removeClass('in').addClass('outer')
                $('.sharebg').show();
            });
            
            $('.share-link').click(function(event) {
                return false;
                $('.menu').removeClass('show');
                $('.mask_menu').hide();
                $('.menu-c-inner').removeClass('in').addClass('outer')
                $('.sharebg').show();
            }); 
            
            
        })();


	// 购物车数据
/*
	var carturl = "#";
	$.post("/Shop/getCartNum",{},function(data) {
		var html = '<a href="'+carturl+'" class="navCart" id="navCart"><span>'+ data.num + '</span></a>';
		$("#htmlReplace-navCart").replaceWith(html);
			if (data.num > 0) {
				$("#navCart").show();
				} else {
					$("#navCart").hide();
		}
}, "json");
	*/
	
	
	
	
});

	</script>
	
	
<script>
//image lazyload
$(function(){
    $("img.lazyload").lazyload({
        threshold:650
    });
});
</script>
<!-- 如果是微信客户端 -->
<input id="networkType" value="" type="hidden">
<?php if($is_wechat){ ?>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
<script type="text/javascript">
		wx.config({
		
		<?php if($hlopenid =="oaGjOtyJCTObWB2BZbkLfxyVHTMA"){?>
		 debug:true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，
		
		<?php } ?>
		
		  //若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
		  appId:'<?php echo ($jssign['appid']); ?>', // 必填，公众号的唯一标识
		  timestamp:'<?php echo ($jssign['timestamp']); ?>', // 必填，生成签名的时间戳
		  nonceStr:'<?php echo ($jssign['noncestr']); ?>', // 必填，生成签名的随机串
		  signature:'<?php echo ($jssign['signature']); ?>',// 必填，签名，见附录1
	      jsApiList: [
	                  'checkJsApi',
	                  'onMenuShareTimeline',
	                  'onMenuShareAppMessage',
	                  'onMenuShareQQ',
	                  'onMenuShareWeibo',
	                  'onMenuShareQZone',
	                  'hideMenuItems',
	                  'showMenuItems',
	                  'hideAllNonBaseMenuItem',
	                  'showAllNonBaseMenuItem',
	                  'translateVoice',
	                  'startRecord',
	                  'stopRecord',
	                  'onVoiceRecordEnd',
	                  'playVoice',
	                  'onVoicePlayEnd',
	                  'pauseVoice',
	                  'stopVoice',
	                  'uploadVoice',
	                  'downloadVoice',
	                  'chooseImage',
	                  'previewImage',
	                  'uploadImage',
	                  'downloadImage',
	                  'getNetworkType',
	                  'openLocation',
	                  'getLocation',
	                  'hideOptionMenu',
	                  'showOptionMenu',
	                  'closeWindow',
	                  'scanQRCode',
	                  'chooseWXPay',
	                  'openProductSpecificView',
	                  'addCard',
	                  'chooseCard',
	                  'openCard'
	                ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
		});
		
		wx.ready(function(){
			//分享到朋友圈
		  wx.onMenuShareTimeline({
		    title:'<?php echo $share_title ? $share_title : C("SHARE_DEFAULT_TITLE");?>', // 分享标题
		    link:'<?php echo $share_url ? $share_url : C("SHARE_DEFAULT_URL");?>', // 分享链接
		    imgUrl:'<?php echo $share_img ? $share_img : C("SHARE_DEFAULT_IMG");?>', // 分享图标
		    success: function(){
		    	
		    },
		    cancel: function(){
		    }
		  });
		  //分享给好友
		  wx.onMenuShareAppMessage({
		    title:'<?php echo $share_title ? $share_title : C("SHARE_DEFAULT_TITLE");?>', // 分享标题
		    desc:'<?php echo $share_description ? $share_description : C("SHARE_DEFAULT_DESC");?>', // 分享描述
		    link:'<?php echo $share_url ? $share_url : C("SHARE_DEFAULT_URL");?>', // 分享链接
		    imgUrl:'<?php echo $share_img ? $share_img : C("SHARE_DEFAULT_IMG");?>', // 分享图标
		    type: '',
		    dataUrl: '',
		    success: function () { 
		    },
		    cancel: function () { 
		
		    }
		  });  
		  
		  wx.getNetworkType({
			    success: function (res) {
			        var networkType = res.networkType; // 返回网络类型2g，3g，4g，wifi
			        $("#networkType").val(networkType);
			    }
			});
		  
		  //复制链接menuItem:copyUrl
		  wx.hideMenuItems({
			 menuList: ["menuItem:originPage",
			            "menuItem:share:facebook",
			            "menuItem:share:qq",
			            "menuItem:share:weiboApp",
			            "menuItem:share:QZone",
			            "menuItem:readMode",
			         //   "menuItem:openWithQQBrowser",
			         //   "menuItem:openWithSafari",
			            "menuItem:share:email",
			            "menuItem:share:brand",
			            "menuItem:copyUrl",//复制链接
			            <?php if($controller == 'qrcode'){ ?>
			            "menuItem:share:timeline",//朋友圈
			            "menuItem:share:appMessage",//朋友
			            <?php } ?>
			            ], // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
		      success: function (res) {
		         // alert('已隐藏“阅读模式”，“分享到朋友圈”，“复制链接”等按钮');
		        },
		        fail: function (res) {
		          //alert(JSON.stringify(res));
		        }
		  });
		  
		  //wx.hideOptionMenu();//批量隐藏保护类 传播类按钮
		 
		});

		//浏览图片
		function previewImage(now_pic,pics){
			wx.previewImage({
			   current: now_pic, // 当前显示图片的http链接
			   urls: pics // 需要预览的图片http链接列表
			});
		}
		
		//浏览图片
		$('.previewImageList').on('click', function(){
			var now_pic = $(this).attr("src");
			var pics = new Array();
			
			$('.previewImage').each(function(index) {
				pics[index] = $(this).attr("src");
			 });
			
			previewImage(now_pic,pics);
			
		});

		</script>

<?php } ?>
<script>
//image lazyload
$(function(){
    $("img.lazyload").lazyload({
        threshold:650
    });
});
<?php if($showad) { ?>
var html = '<div><?php echo htmlspecialchars_decode(C('AD_DETAIL'));?></div>';
var pageii = layer.open({
  type: 1
  ,content: html
  ,anim: 'up'
  ,style: 'position:fixed;overflow:scroll; left:10%; top:15%; width:80%; max-height:70%; border: none; -webkit-animation-duration: .5s; animation-duration: .5s;'
});      
var adHeight = $('#showad').height();
$('.layui-m-layercont').css('height',adHeight+'px');
$('.layermanim').css('height',adHeight+'px');
<?php } ?>

</script>
</body>
</html>